package com.slz3.business.module.configManagement.conZoneTemplate.steward;

import com.slz3.business.module.configManagement.conZoneTemplate.domain.ConZoneTemplate;
import com.slz3.business.module.configManagement.conZoneTemplate.domain.ConZoneTemplateCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class ConZoneTemplateResponse {

    @Resource
    private ConZoneTemplateResController conZoneTemplateResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplate.class).flatMap(conZoneTemplate ->
                conZoneTemplateResController.add(req, conZoneTemplate)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.delete(req, conZoneTemplateCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplate.class).flatMap(conZoneTemplate ->
                conZoneTemplateResController.modify(req, conZoneTemplate)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return conZoneTemplateResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return conZoneTemplateResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return conZoneTemplateResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.auditSubmit(req, conZoneTemplateCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.audit(req, conZoneTemplateCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.auditReject(req, conZoneTemplateCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.usingEnable(req, conZoneTemplateCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConZoneTemplateCondition.class).flatMap(conZoneTemplateCondition ->
                conZoneTemplateResController.usingDisable(req, conZoneTemplateCondition)
        );
    }   

}
